/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.hera.process.config.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.hera.base.domain.BaseDomain;
import com.hera.process.external.domain.AddTableDetail;
import com.hera.process.workflow.domain.Process;

/**
 *
 * @author cmontes
 */
@Entity
@Table(name = "SIST_VARIABLE")
public class SistVariable extends BaseDomain implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @Column(name = "ID_VARIABLE")
    private Long idVariable;
    private String name;
    private String description;
    @Column(name = "ID_SCOPE")
    private Long idScope;
    private String value;
    @JoinColumn(name = "ID_PROCESS", referencedColumnName = "ID_PROCESS")
    @ManyToOne
    private Process process;
    @JoinColumn(name = "ID_ADD_TABLE_DETAIL", referencedColumnName = "ID_ADD_TABLE_DETAIL")
    @ManyToOne
    private AddTableDetail addTableDetail;

    public SistVariable() {
    }

    public SistVariable(Long idVariable) {
        this.idVariable = idVariable;
    }

    public Long getIdVariable() {
        return idVariable;
    }

    public void setIdVariable(Long idVariable) {
        this.idVariable = idVariable;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Long getIdScope() {
        return idScope;
    }

    public void setIdScope(Long idScope) {
        this.idScope = idScope;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public Process getProcess() {
        return process;
    }

    public void setProcess(Process process) {
        this.process = process;
    }

    public AddTableDetail getAddTableDetail() {
        return addTableDetail;
    }

    public void setAddTableDetail(AddTableDetail addTableDetail) {
        this.addTableDetail = addTableDetail;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idVariable != null ? idVariable.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        
        if (!(object instanceof SistVariable)) {
            return false;
        }
        SistVariable other = (SistVariable) object;
        if ((this.idVariable == null && other.idVariable != null) || (this.idVariable != null && !this.idVariable.equals(other.idVariable))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.hera.process.data.domain2.SistVariable[ idVariable=" + idVariable + " ]";
    }
    
}
